Skip to content

Don't retry test task on 4xx callback errors - #240

Merged
anfimovdm merged 1 commit into
clfrom
al-alts-no-retry-4xx-callback
Nov 5, 2026
Merged

anfimovdm merged 1 commit into
clfrom
al-alts-no-retry-4xx-callback

Conversation

@anfimovdm

Copy link
Copy Markdown
Contributor

Summary

When callback_href returns a 4xx (e.g. 404 for a removed build task), raise_for_status() raised HTTPError, which is in AUTO_RETRY_EXCEPTIONS. Celery then re-ran the whole run_tests task up to 5 more times (new environment, install, tests, teardown) for an error that retrying can't fix.

Changes

  • alts/worker/tasks.py: on 4xx callback responses, log an error and return the summary instead of raising. 5xx responses still raise and are retried as before (502 is additionally retried at the HTTP level by the urllib3 Retry).

Testing

  • Syntax check only; no automated tests run.

🤖 Generated with Claude Code

A client error from callback_href (e.g. 404 for a removed build task) won't be fixed by re-running the whole test task, so log it instead of raising HTTPError into Celery autoretry. 5xx errors are still retried.
@anfimovdm
anfimovdm merged commit 835c052 into cl Nov 5, 2026
1 of 3 checks passed
@anfimovdm
anfimovdm deleted the al-alts-no-retry-4xx-callback branch November 5, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant